A Content Type hub is a feature that publishes
content types to other site collections. In SharePoint 2010, the content
type can be defined once and managed from a central location. No longer
is the content type creation in a site collection a silo of work that
must be repeated in all the other site collections (and web
applications) where it must be available.
Content types can now be shared across an organization.
The business rationale for this feature is the
ability for an organization to create a central repository of content
type assets. Then, as other site collections need to leverage these
content types, they are available.
A popular feature is the publishing website. It is
not uncommon to create different article content types that contain site
columns. Enterprise organizations would leverage the article content
types across site collections so that they are consuming the same
metadata. The effect of this is a highly efficient organization through
the reuse of content structures. Everyone is speaking the same language,
even if there are nuances to the organization's vernacular.
This recipe shows how to set up a Content Type hub.
Getting ready
You must have farm-level administrative permissions to the Central Administration site.
Create a site collection called sites\ContentTypeHub, based on the Publishing Site Template, and make yourself the owner.
The Document ID service must be activated on the site
collection that is the Content Type hub in order for the publishing to
work.
How to do it...
Open the Central Administration screen and click Application Management.
The third section is Service Applications. Under this section, click Manage service applications.
Find the Managed Metadata Service application and left-click to the right of the name, the line will be highlighted.
Click the Properties option on the ribbon.
The Create New Managed Metadata Service pop-up screen will appear. At the bottom of the pop-up screen, you can see a box to enter the URL of the Content Type hub.
Enter the URL of the site collection that was created prior to the beginning of this recipe. It should be of the form http://servername/sites/ContentTypeHub.
Check the Report syndication... option and click OK.
Click to the right of Managed Metadata Service connection, highlighting the line. Click the Properties option on the ribbon.
The Edit Managed Metadata Service Connection pop-up appears. Check the Consumes content types from the Content Type... option; the other three options are checked by default.
Click OK.
Open the sites/ContentTypeHub site collection. Click Site Actions and then Site Settings.
Under the Galleries section click Site columns.
Click Create. In the Name column, call it ArticleHeadline. Keep it as a single line of text and keep the rest of the defaults. Press OK.
Navigate back to Site Settings. Under the Galleries section, click Site content types.
Click Create. In the Name column, enter Article.
Click on the drop-down for Parent Content Type and choose Publishing Content Types from the Select parent content type from: drop-down. Click OK.
A page called Site Content Type Information is presented. Click Add from existing site columns.
Add article headline and click OK.
Click Manage publishing for this content type.
By default Publish is chosen. Click OK.
Create a new Site Collection called sites/ContentTypeHubConsume, through Central Administration. Base it on the Publishing Portal Template.
Now, when the timer job runs, the new article content type that we just created (ContentTypeHubConsume) will automatically be published to the new site collection.
How it works...
The first ten steps in the recipe identify and
configure the Content Hub Type site collection in the Managed Metadata
Service. All of the content types are published from this hub.
In our example, both site collections were created
under one web application. The web application is associated with the
Managed Metadata Service that was modified in step 3.
The rest of the recipe was spent creating a content type called Article. Clicking on the content type in the Site Content Types Gallery shows a new menu item called Manage publishing for this content type under Settings.
This option contains a section called Publishing History that shows when the content type was last published. It contains three radio options: Publishing, Unpublish, and Republish.
It is important that steps 18 and 19 be run as the content type will not be published until these steps are completed.
When publishing a content type, it is not immediately
available in the other site collections. This is because there are two
jobs that must be run. The first is called Content Type Hub and it publishes the content types that need to be pushed. The second job is called Content Type Subscriber&; and it puts the available content types in the site collections.
There's more...
In the site collection, which is the Content Type Hub under Site Settings, there are two menu items under Site Collection Administration. These are:
Content type publishing: This setting
allows the administrator to refresh all of the published content types.
It contains a link to the error log and shows the hubs for all existing
Managed Metadata Service applications.
Content type service application type error log: In step 7 of the recipe, we enabled the Report syndication... checkbox, in order for us to be able to receive reports on import errors. These errors are found in this log.
Site collections that are not Content Type Hubs, have only the first menu item — Content type publishing.